/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package game_shooter;

import framework.GameObjectSprite;
import javax.microedition.lcdui.Graphics;
import javax.microedition.lcdui.Image;

/**
 *
 * @author a969010
 */
class Boss extends GameObjectSprite {

    private int changeSpeedXCounter;

    public Boss(Image image) {
        super(image);
        setWidth(image.getWidth());
        setHeight(image.getHeight());
        setSpeed(1);
    }

    public void update() {
        if (changeSpeedXCounter++ > 60) {
            setSpeedX(-getSpeedX());
            changeSpeedXCounter = 0;
        }

        setX(getX() + getSpeedX());
    }

    public void paint(Graphics g) {
        drawSprite(g);
    }

    public void collided(GameObjectSprite collidedObject) {
    }
}
